home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3656 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.7 KB  |  62 lines

  1. Path: news.danadata.dk!usenet
  2. From: dantek <dantek@danadata.dk>
  3. Newsgroups: comp.lang.c++
  4. Subject: Using MSVC and the _WEP
  5. Date: Thu, 25 Jan 1996 12:14:12 +0100
  6. Organization: Dantek A/S
  7. Message-ID: <31076604.4250@danadata.dk>
  8. NNTP-Posting-Host: 193.162.156.18
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b5 (Win95; I)
  13.  
  14. Hi
  15. I use MSVC v 1.5 under Windows NT
  16. I have made a 16-bit DLL that uses the MFC in such a way there is 
  17. nothing 
  18. visual in the DLL.
  19. When the last client is shutdown I would like to clean up the memory and 
  20. disconnect from ODBC.
  21. I have read that I should make a _WEP function and so I have done. The 
  22. only 
  23. problem is that it is never called. In the DLL I have no 
  24. CWinApp-inherited 
  25. class, but do I have to have an CWinApp::ExitInstance() function?
  26. I have read that in the .DEF-file I have to define WEP @1 RESIDENTNAME 
  27. eventhough I dont implement it.
  28. The _WEP function is defined as:
  29.  
  30. extern "C" int __far __pascal _WEP(int nExitType);
  31.  
  32. // Put _WEP code into same fixed segment as the WEP function.
  33. #pragma alloc_text(WEP_TEXT, _WEP)
  34.  
  35. extern "C" int __far __pascal _WEP(int nExitType)
  36. {
  37.    //
  38.    // Exit cleanup code goes here. 
  39.     Done();
  40.    //
  41.    return nExitType ;
  42. }
  43.  
  44. I know that my _WEP-function is never called because I placed a 
  45. breakpoint 
  46. inside it.
  47. Has anyone had the same problem as me and knows the answer?
  48.  
  49. I hope you can answer my questions?
  50. Yours Sincerly
  51.  
  52.  Kristian Lippert
  53.  
  54.   e-mail: dantek@danadata.dk (Kristian Lippert)
  55.   snail-mail: Dantek a/s
  56.           att: Kristian Lippert
  57.           Vestergade 41
  58.           8600 Silkeborg
  59.           Denmark
  60.   phone: +45 86 80 30 99
  61.   fax:   +45 86 80 30 94
  62.